dnd: Drop gdk_drag_drop
authorMatthias Clasen <mclasen@redhat.com>
Fri, 13 Jul 2018 16:56:58 +0000 (18:56 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 15 Jul 2018 19:58:05 +0000 (15:58 -0400)
This is an inconsistently used private api, and just adds
a vfunc indirection for no other benefit.

gdk/broadway/gdkdnd-broadway.c
gdk/gdkdrag.c
gdk/gdkdragprivate.h
gdk/wayland/gdkdrag-wayland.c
gdk/win32/gdkdrag-win32.c
gdk/x11/gdkdnd-x11.c

index e17f705f1eafed7b3ee45460d848daa272cd7364..1305ea353a5b6da3618cef8ad65a4aad144a0559 100644 (file)
@@ -104,13 +104,6 @@ _gdk_broadway_surface_drag_begin (GdkSurface         *surface,
   return new_context;
 }
 
-static void
-gdk_broadway_drag_drag_drop (GdkDrag *context,
-                                     guint32         time)
-{
-  g_return_if_fail (context != NULL);
-}
-
 void
 _gdk_broadway_surface_register_dnd (GdkSurface      *surface)
 {
@@ -128,6 +121,4 @@ gdk_broadway_drag_class_init (GdkBroadwayDragClass *klass)
   GdkDragClass *context_class = GDK_DRAG_CLASS (klass);
 
   object_class->finalize = gdk_broadway_drag_finalize;
-
-  context_class->drag_drop = gdk_broadway_drag_drag_drop;
 }
index f0ae819e025e30a3872c6498b1efd9ca1568eaf8..781aaebcb6b96cd59d1b38a266018b7759706a5c 100644 (file)
@@ -439,24 +439,6 @@ gdk_drag_class_init (GdkDragClass *klass)
   g_object_class_install_properties (object_class, N_PROPERTIES, properties);
 }
 
-/*
- * gdk_drag_drop:
- * @drag: a #GdkDrag
- * @time_: the timestamp for this operation
- *
- * Drops on the current destination.
- *
- * This function is called by the drag source.
- */
-void
-gdk_drag_drop (GdkDrag *drag,
-               guint32  time_)
-{
-  g_return_if_fail (GDK_IS_DRAG (drag));
-
-  GDK_DRAG_GET_CLASS (drag)->drag_drop (drag, time_);
-}
-
 static void
 gdk_drag_write_done (GObject      *content,
                      GAsyncResult *result,
index 665f8452e50bfb6e6a0b9956b77e280f5532b9a8..86c5c3a0f5afe3f5e7bfa4816a712961add74bc8 100644 (file)
@@ -33,8 +33,6 @@ typedef struct _GdkDragClass GdkDragClass;
 struct _GdkDragClass {
   GObjectClass parent_class;
 
-  void        (*drag_drop)     (GdkDrag  *drag,
-                                guint32          time_);
   GdkSurface*  (*get_drag_surface) (GdkDrag *drag);
   void        (*set_hotspot)   (GdkDrag  *drag,
                                 gint             hot_x,
@@ -85,9 +83,6 @@ gboolean gdk_drag_handle_source_event (GdkEvent       *event);
 GdkCursor * gdk_drag_get_cursor       (GdkDrag        *drag,
                                        GdkDragAction   action);
 
-void     gdk_drag_drop                (GdkDrag        *drag,
-                                       guint32         time_);
-
 void     gdk_drag_write_async         (GdkDrag             *drag,
                                        const char          *mime_type,
                                        GOutputStream       *stream,
index 6ab99d77bae72d91211b023eb1f6b004eb6d234c..d1c2de069c668f431295feb437099a9ca39b83fb 100644 (file)
@@ -104,12 +104,6 @@ gdk_to_wl_actions (GdkDragAction action)
   return dnd_actions;
 }
 
-static void
-gdk_wayland_drag_drag_drop (GdkDrag *drag,
-                            guint32  time)
-{
-}
-
 static void
 gdk_wayland_drag_init (GdkWaylandDrag *drag_wayland)
 {
@@ -196,7 +190,6 @@ gdk_wayland_drag_class_init (GdkWaylandDragClass *klass)
 
   object_class->finalize = gdk_wayland_drag_finalize;
 
-  drag_class->drag_drop = gdk_wayland_drag_drag_drop;
   drag_class->get_drag_surface = gdk_wayland_drag_get_drag_surface;
   drag_class->set_hotspot = gdk_wayland_drag_set_hotspot;
   drag_class->drop_done = gdk_wayland_drag_drop_done;
index 82a653df1aa9d2a3ddbfddca4c32f3b8bc88c2c7..86413f8c1150b0d1d0beb25144da57b80f309e7c 100644 (file)
@@ -2287,7 +2287,8 @@ gdk_win32_drag_drop_performed (GdkDrag *drag,
   GDK_NOTE (DND, g_print ("gdk_win32_drag_drop_performed: 0x%p %u\n",
                           drag,
                           time_));
-  gdk_drag_drop (drag, time_);
+
+  gdk_win32_drag_drop (drag, time_);
   gdk_drag_set_cursor (drag, NULL);
   drag_context_ungrab (drag);
 }
@@ -2564,8 +2565,6 @@ gdk_win32_drag_class_init (GdkWin32DragClass *klass)
 
   object_class->finalize = gdk_win32_drag_finalize;
 
-  drag_class->drag_drop = gdk_win32_drag_drop;
-
   drag_class->get_drag_surface = gdk_win32_drag_get_drag_surface;
   drag_class->set_hotspot = gdk_win32_drag_set_hotspot;
   drag_class->drop_done = gdk_win32_drag_drop_done;
index 81b8db655cc9aabeb31f3f71af83d353354428eb..eb79ab12ffe88df0c5450247617f0cc2801ae687 100644 (file)
@@ -196,7 +196,7 @@ static gboolean    gdk_x11_drag_drag_motion  (GdkDrag         *drag,
                                               GdkDragAction    suggested_action,
                                               GdkDragAction    possible_actions,
                                               guint32          time);
-static void        gdk_x11_drag_drag_drop    (GdkDrag         *drag,
+static void        gdk_x11_drag_drop         (GdkDrag         *drag,
                                               guint32          time_);
 static GdkSurface * gdk_x11_drag_get_drag_surface (GdkDrag    *drag);
 static void        gdk_x11_drag_set_hotspot  (GdkDrag         *drag,
@@ -219,7 +219,6 @@ gdk_x11_drag_class_init (GdkX11DragClass *klass)
 
   object_class->finalize = gdk_x11_drag_finalize;
 
-  drag_class->drag_drop = gdk_x11_drag_drag_drop;
   drag_class->get_drag_surface = gdk_x11_drag_get_drag_surface;
   drag_class->set_hotspot = gdk_x11_drag_set_hotspot;
   drag_class->drop_done = gdk_x11_drag_drop_done;
@@ -1600,8 +1599,8 @@ gdk_x11_drag_drag_motion (GdkDrag *drag,
 }
 
 static void
-gdk_x11_drag_drag_drop (GdkDrag *drag,
-                                guint32         time)
+gdk_x11_drag_drop (GdkDrag *drag,
+                   guint32  time)
 {
   GdkX11Drag *drag_x11 = GDK_X11_DRAG (drag);
 
@@ -2165,7 +2164,7 @@ static void
 gdk_x11_drag_drop_performed (GdkDrag *drag,
                              guint32  time_)
 {
-  gdk_drag_drop (drag, time_);
+  gdk_x11_drag_drop (drag, time_);
   drag_ungrab (drag);
 }